<!-- 搜索表单 -->
<template>
  <ele-card :body-style="{ paddingBottom: '2px' }">
    <el-form label-width="72px" @keyup.enter="search" inline>
      <el-form-item label="状态">
        <el-radio-group v-model="form.status" @change="search">
          <el-radio-button label="">全部</el-radio-button>
          <el-radio-button :label="0">待审核</el-radio-button>
          <el-radio-button :label="1">已处理</el-radio-button>
          <el-radio-button :label="2">已拒绝</el-radio-button>
        </el-radio-group>
      </el-form-item>
      <!-- <br />
      <el-form-item label="申请时间">
        <el-date-picker
          v-model="form.startDate"
          class="filter-item"
          type="date"
          placeholder="开始"
          value-format="YYYY-MM-DD"
          style="width: 150px"
        />
        <el-date-picker
          v-model="form.endDate"
          class="filter-item"
          type="date"
          placeholder="结束"
          value-format="YYYY-MM-DD"
          style="width: 150px; margin-left: 8px"
        />
      </el-form-item>
      <br />
      <el-form-item label="处理时间">
        <el-date-picker
          v-model="judgeDateRange"
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          @change="generateJudgeDates"
          value-format="YYYY-MM-DD HH:mm:ss"
        />
      </el-form-item> -->

      <!-- <el-form-item label-width="16px">
        <el-button type="primary" @click="search">查询</el-button>
      </el-form-item> -->
    </el-form>
  </ele-card>
</template>

<script setup>
  import { useFormData } from '@/utils/use-form-data';

  const emit = defineEmits(['search']);

  /** 表单数据 */
  const [form] = useFormData({
    status: 0
  });

  /** 搜索 */
  const search = () => {
    console.log(form);
    emit('search', { ...form });
  };
</script>
